package cn.bdqn.utils;

public class StringDemo02 {

	public static void main(String[] args) {
		
		String phone="0556-7435888";
		int index=phone.indexOf('-');
		System.out.println("index==>"+index);
		String path="D:douban/film";
		int lastSlashlndex=path.lastIndexOf("/");
		System.out.println("lastSlashlndex==>"+lastSlashlndex);
		String fileName=path.substring(lastSlashlndex+1);
		System.out.println("fileName==>"+fileName);
		int dotlndex=path.lastIndexOf(".");
		int endlndex=path.length();
		String fileSuffix =path.substring(dotlndex, endlndex);
		System.out.println("fileSuffix==>"+fileSuffix);
	 
	 
	}

}
